package edu.vo;

import edu.vo.ID.ScoreRatioId;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "score_ratio")
@IdClass(ScoreRatioId.class)
public class ScoreRatio {
    @Id
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "course_id", nullable = false)
    private Course course;

    @Id
    @Column(name = "item_name", nullable = false, length = 20)
    private String itemName;

    @Column(name = "ratio", nullable = false)
    private Integer ratio;
}